<!-- 公用脚部 -->
<include file="Order/Index/CommonHeader"/>

<div class="bjui-pageContent tableContent">


    <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
        <?php foreach($list as $arr):?>
        <tr data-id="{$arr.order_id}" id="orderIndex{$arr.order_id}">
            <td style="padding: 10px 20px;">
                <form action="{:U('createOrder')}" class="pageForm" data-toggle="validate" method="post" data-callback="createOrderCallback">
                    <input type="hidden" name="order_id" value="{$arr.order_id}">
                    
                  <div style="position:relative;margin-top: 10px;">
                  
                  <div style="color: red;font-size: 15px;font-weight: 700;margin-bottom: 10px;">

 <input type="checkbox" name="ids" data-toggle="icheck" value="{$arr.order_id}">
                                B2C订单号：{$arr.order_sn}
                                
                         </div>           
                                
                                
                    <table class="showposition" style="padding: 15px;display: block;width: 98%;margin-bottom: 10px;border: solid 1px #00A8FF;background-color: #E2F5FF;">
                        <tr>
                            <td colspan="4" style="line-height:25px;"><span style="font-weight:700;">主订单编号：</span>{$arr.host_order_sn}</td>
                            <td colspan="4" style="line-height:25px;"><span style="font-weight:700;">卡后末四位：</span>{$arr.message}</td>
                        </tr> 
                        <tr>
                            <td colspan="4" style="line-height:25px;"><span style="font-weight:700;">持卡人姓名：</span>{$arr.confirm_info1}</td>
                            <td colspan="4" style="line-height:25px;"><span style="font-weight:700;">持卡人手机号码：</span>{$arr.confirm_info2}</td>
                        </tr> 
                        <tr>
                            <td colspan="4" style="line-height:25px;"><span style="font-weight:700;">下单时间：</span>{$arr.add_time|time_format}</td>
                            <td colspan="4" style="line-height:25px;"><span style="font-weight:700;">支付时间：</span>{$arr.pay_time|time_format}</td>
                        </tr> 
                        <tr>
                            <td colspan="4" style="line-height:25px;"><span style="font-weight:700;">订单状态：</span>{$arr.order_status}</td>
                            <td colspan="4" style="line-height:25px;"><span style="font-weight:700;">卖家备注：</span>{$arr.seller_note}</td>
                        </tr> 
                        <tr>
                            <td colspan="4" style="line-height:25px;"><span style="font-weight:700;">发票信息：</span>
                                <span id="invoice{$arr.order_id}">{$arr.invoice_type} {$arr.invoice_title} {$arr.invoice_content}</span>
                                <a href="{:U('invoice?navTabId=Order'.$arr['order_id'].'&orderId='.$arr['order_id'])}"
                                   class="btn btn-green" data-height="200" data-width="400"
                                   data-toggle="dialog" data-id="dialog-normal"
                                   data-mask="true" data-title="{$arr.order_sn}-发票编辑">编辑</a>
                            </td>
                        </tr> 
                        <tr>
                            <td colspan="4" style="line-height:25px;"><span style="font-weight:700;">审单备注：</span>
                                <span id="checkNote{$arr.order_id}">{$arr.check_note}</span>
                                <!--<input type="text" name="check_note" value="{$arr.check_note}">-->
                                <a href="{:U('checkNote?navTabId=Order'.$arr['order_id'].'&orderId='.$arr['order_id'])}"
                                   class="btn btn-green" data-height="200" data-width="400"
                                   data-toggle="dialog" data-id="dialog-normal"
                                   data-mask="true" data-title="{$arr.order_sn}-审单备注编辑">编辑</a>
                            </td>
                        </tr>
</table>

                            <a href="{:U('fail?orderId='.$arr['order_id'])}" class="btn btn-red signFail" data-toggle="dialog"
                               data-id="dialog-normal" data-mask="true" data-title="{$arr.order_sn}-标记失败" style="position:absolute;right: 34px; top:0px;">标记失败</a>
    
    </div> 
        
 <style>
 .showposition td, .showposition th { 
width: 400px; 
}
 </style>
 
                    <table class="table table-condensed table-hover" width="100%" style="padding: 15px;display: block;">
                  
               
                        <tr>
                            <td colspan="4" style="overflow:visible;border: none;line-height: 30px;">订单商品：
                                <code id="orderSign{$arr.order_id}" style="color:#000000;font-size:20px;">
                                    <?php if($arr['orderList'])foreach ($arr['orderList'] as $key => $order):?>
                                        <?php echo $order['goods_name'].';';?>
                                    <?php endforeach;?>
                                </code>
                                <input type="hidden" value="<?php echo count($arr['orderList'])>0 ? '1' : '';?>" data-rule="required" data-msg="商品未添加">
                            </td>
                        </tr>
                        <tr id="orderGoods{$arr.order_id}">
                            <td colspan="4" style="overflow:visible;border: none;line-height: 30px;">
                                <a data-title="订单管理-添加商品" data-mask="true" data-id="dialog-addGoods" data-height="400"
                                   data-width="800" data-toggle="dialog" class="btn btn-green"
                                   href="{:U('searchGoods?orderId='.$arr['order_id'])}">点击添加/查看商品</a>
                                <code id="orderGoodsSign{$arr.order_id}" style="font-size:20px;">
                                    <?php echo count($arr['orderList'])>0 ? '商品已添加' : '商品未添加';?>
                                </code>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" style="border: none;line-height: 30px;">
                                <label class="control-label">收 货 人：</label>
                                <input type="text" name="user_name" value="{$arr.user_name}">
                            </td>
                        </tr>

                        <tr>
                            <td colspan="2" style="border: none;line-height: 30px;">
                                <label class="control-label">手机号码：</label>
                                <input type="text" name="mobile_phone" value="{$arr.mobile_phone}">
                            </td>
                            <td colspan="2" style="border: none;line-height: 30px;">
                                <label class="control-label">电话：</label>
                                <input type="text" name="home_phone" value="{$arr.home_phone}">
                            </td>
                        </tr>

                        <tr>
                            <td colspan="2" style="border: none;line-height: 30px;">
                                <label class="control-label">送货地址：</label>
                                <input type="text" name="address" value="{$arr.address}" size="50">
                            </td>
                            <td colspan="2" style="border: none;line-height: 30px;">
                                <label class="control-label">邮编：</label>
                                <input type="text" name="zip_code" value="{$arr.zip_code}">
                            </td>
                        </tr>

                        <tr>
                            <td colspan="4" style="border: none;line-height: 30px;">
                                <label class="control-label">设置快递：</label>
                                <select name="express_id" data-toggle="selectpicker" data-rule="required">
                                    <option value="">请选择快递</option>
                                    <?php foreach($expressList as $express):?>
                                    <option value="{$express.id}"
                                    <?php echo C('DEFAULT_EXPRESS')==$express['id'] ? "selected='true'" : "";?>
                                    >{$express.name}</option>
                                    <?php endforeach;?>
                                </select>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="4" style="border: none;line-height: 30px;">
                                <label class="control-label">打印留言：</label>
                                <input type="text" name="print_message" value="{$arr.print_message}">
                                <font class="other">(例如：周末不要派送; 不要超过10个字)</font>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="4" style="border: none;line-height: 30px;">
                                <label class="control-label">销售客服：</label>
                                <select name="seller_id" data-toggle="selectpicker" data-rule="required">
                                    <option value="">{$groupTitle}</option>
                                    <?php foreach($memberGroup as $member):?>
                                    <option value="{$member.uid}"
                                    <?php echo $user['uid']==$member['uid'] ? "selected='true'" : (C('DEFAULT_SALE_USER')==$member['uid'] ? "selected='true'" : '');?>
                                    >{$member.username}</option>
                                    <?php endforeach;?>
                                </select>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="4" style="border: none;line-height: 30px;">
                                <label class="control-label">审单留言：</label>
                                <textarea name="check_message" value="{$arr.check_message}" cols="50" rows="3"
                                          data-toggle="autoheight">{$arr.check_message}</textarea>
                            </td>
                        </tr>
                        <td data-noedit="true" style="border: none;line-height: 30px;">
                            <button type="submit" class="btn-green" data-icon="save">生成订单</button>
                        </td>
                    </table>
                </form>
            </td>
        </tr>
        <?php endforeach;?>
    </table>
</div>

<!-- 公用脚部 -->
<include file="Order/Index/CommonFooter"/>

